<?php
	class Stock
	{
		private $name;
		private $price;
		private $quantity;
		
		public function setStockName($name)
		{
			$this->name=$name;
		}
		
		public function setStockPrice($price)
		{
			if($price<=0)
			{
				echo "Invalid input!";
			}
			else 
			{
				$this->price=$price;
			}
		}
		
		public function setStockQuantity($kg)
		{
			if($kg<=0)
			{
				echo "Invalid input!";
			}
			else 
			{
				$this->quantity=$kg;
			}
		}
		
		public function getStockName()
		{
			return $this->name;
		}
		
		public function getStockPrice()
		{
			return $this->price;
		}
		
		public function getStockQuantity()
		{
			return $this->quantity;
		}
		
	};
?>
